import { createRouter, createWebHashHistory, RouteRecordRaw } from 'vue-router'

// 第一个3D案例
import first from '../views/TheFirst3DCase.vue'
// 灯光示例
import lightCase from '../views/LightCase.vue'
// 透视投影相机
import boxArray from '../views/BoxGeometryArray.vue'
// 不同的几何体
import geometry from '../views/Geometry.vue'
// 高光材质
import phongMaterial from '../views/PhongMaterial.vue';
// 可视化改变三维场景
import gui from '../views/Gui.vue';
// 自定义几何体
import customGeometry from '../views/CustomGeometry.vue';
// 欧拉Euler
import euler from '../views/Euler.vue';
// 分组 - 树结构模型
import group from '../views/Group.vue';
// 分组 - 树结构模型 - 小区示例
import community from '../views/Community.vue';
// 不同几何体的纹理贴图
import texture from '../views/texture.vue';
// 纹理贴图 - 阵列实现瓷砖效果
import tile from '../views/tile.vue';
// 纹理贴图 - 透明图片标注
import transparentImgAnnotation from '../views/transparentImgAnnotation.vue';
// 加载GLTF模型
import loadGltf from '../views/loadGltf.vue';
// 圆弧
import circularArc from '../views/circularArc.vue';
// 三维样条曲线
import catmullRomCurve3 from '../views/CatmullRomCurve3.vue';
// 贝塞尔曲线
import bezierCurve from '../views/BezierCurve.vue';
// 3D地球
import earth3d from "../cases/Earth3D.vue";
// 3D房屋室内
import house3d from "../cases/House3D.vue";
//
import vrHouseView from "../cases/VRHouseView.vue";
//
import houseView from "../cases/HouseView.vue";
// leaning-threejs 书上的
import firstScene from "../book/chapter-01/first-scene.vue";
import materialsLight from '../book/chapter-01/materials-light.vue';
import materialsLightAnimation from '../book/chapter-01/materials-light-animation.vue';
import controlGui from '../book/chapter-01/control-gui.vue';
import screenSizeChange from '../book/chapter-01/screen-size-change.vue';
import chapter02BasicScene from '../book/chapter-02/chapter-02-basic-scene.vue';
import chapter02FogScene from '../book/chapter-02/chapter-02-fog-scene.vue';
import chapter02ForcedScene from '../book/chapter-02/chapter-02-forced-scene.vue';
import chapter02Geometries from '../book/chapter-02/chapter-02-geometries.vue';
import chapter02CustomGeometry from '../book/chapter-02/chapter-02-custom-geometry.vue';
import chapter02MeshProperties from '../book/chapter-02/chapter-02-mesh-properties.vue';
import chapter02BothCamera from "../book/chapter-02/chapter-02-both-camera.vue";
import chapter02CamerasLookAt from "../book/chapter-02/chapter-02-cameras-lookat.vue";
import ambientLight from "../book/chapter-03/ambient-light.vue";
import spotLight from "../book/chapter-03/spot-light.vue"
import pointLight from "../book/chapter-03/point-light.vue";
import directionalLight from "../book/chapter-03/directional-light.vue";
import hemisphereLight from "../book/chapter-03/hemisphere-light.vue";
import areaLight from "../book/chapter-03/area-light.vue";
import lensflares from "../book/chapter-03/lensflares.vue";
import basicMeshMaterial from "../book/chapter-04/basicMeshMaterial.vue"
import geometriesPlane from "../book/chapter-05/geometries-plane.vue";
import geometriesShape from "../book/chapter-05/geometries-shape.vue";
import depthMaterial from "../book/chapter-04/depthMaterial.vue";
import extrudeGeometry from "../book/chapter-06/extrude-geometry.vue";
import extrudeTube from "../book/chapter-06/extrude-tube.vue";
import extrudeSvg from "../book/chapter-06/extrude-svg.vue";
import textGeometry from "../book/chapter-06/text-geometry.vue";
import sprites from "../book/chapter-07/sprites.vue";
import basicPointCloud from "../book/chapter-07/basicPointCloud.vue";
import programBasedPoint from "../book/chapter-07/programBasedPoint.vue";
import spritesHud from "../book/chapter-07/sprites-hud.vue";
import sprites3d from "../book/chapter-07/sprites-3d.vue";
import createParticleSystemFromModel from "../book/chapter-07/createParticleSystemFromModel.vue";
import grouping from "../book/chapter-08/grouping.vue";
import merging from "../book/chapter-08/merging.vue";
import loadSaveJson from "../book/chapter-08/load-save-json.vue";
import loadObj from "../book/chapter-08/load-obj.vue";
import butterfly from "../book/chapter-08/butter-fly.vue";
import loadCollada from "../book/chapter-08/load-collada.vue";
import loadPdb from "../book/chapter-08/load-pdb.vue";
import loadPly from "../book/chapter-08/load-ply.vue";
import basicAnimation from "../book/chapter-09/basic-animation.vue";
import selectingObjects from "../book/chapter-09/selecting-objects.vue";
import animationTween from "../book/chapter-09/animation-tween.vue";
import trackballControlsCamera from "../book/chapter-09/trackball-controls-camera.vue";
import flyControlsCamera from "../book/chapter-09/fly-controls-camera.vue";
import firstPersonCamera from "../book/chapter-09/first-person-camera.vue";
// import morphTargets from "../book/chapter-09/morph-targets.vue";
import morphTargetManually from "../book/chapter-09/morph-target-manually.vue";
// WebGpu 测试
import webGpuTest from "../webgpu/test.vue";
// js 实现调用电脑媒体设备录制视频和音频
import mediaRecorder from "../media/media-recorder.vue";

const routes: Array<RouteRecordRaw> = [
    { path: '/first', name: 'first', component: first },
    { path: '/light-case', name: 'light-case', component: lightCase },
    { path: '/box-array', name: 'boxArray', component: boxArray },
    { path: '/geometry', name: 'geometry', component: geometry },
    { path: '/phong', name: 'phong', component: phongMaterial },
    { path: '/gui', name: 'gui', component: gui },
    { path: '/custom-geometry', name: 'customGeometry', component: customGeometry },
    { path: '/euler', name: 'euler', component: euler },
    { path: '/group', name: 'group', component: group },
    { path: '/community', name: 'community', component: community },
    { path: '/texture', name: 'texture', component: texture },
    { path: '/tile', name: 'tile', component: tile },
    { path: '/transparent-img', name: 'transparentImgAnnotation', component: transparentImgAnnotation },
    { path: '/load-gltf', name: 'loadGltf', component: loadGltf },
    { path: '/circular-arc', name: 'circularArc', component: circularArc },
    { path: '/catmullRomCurve3', name: 'catmullRomCurve3', component: catmullRomCurve3 },
    { path: '/bezierCurve', name: 'bezierCurve', component: bezierCurve },
    { path: '/earth3d', name: 'earth3d', component: earth3d },
    { path: '/firstScene', name: 'firstScene', component: firstScene },
    { path: '/materialsLight', name: 'materialsLight', component: materialsLight },
    { path: '/materialsLightAnimation', name: 'materialsLightAnimation', component: materialsLightAnimation },
    { path: '/controlGui', name: 'controlGui', component: controlGui, },
    { path: '/screenSizeChange', name: 'screenSizeChange', component: screenSizeChange, },
    { path: '/chapter02BasicScene', name: 'chapter02BasicScene', component: chapter02BasicScene, },
    { path: '/chapter02FogScene', name: 'chapter02FogScene', component: chapter02FogScene, },
    { path: '/chapter02ForcedScene', name: 'chapter02ForcedScene', component: chapter02ForcedScene, },
    { path: '/chapter02Geometries', name: 'chapter02Geometries', component: chapter02Geometries, },
    { path: '/chapter02CustomGeometry', name: 'chapter02CustomGeometry', component: chapter02CustomGeometry, },
    { path: '/chapter02MeshProperties', name: 'chapter02MeshProperties', component: chapter02MeshProperties, },
    { path: '/chapter02BothCamera', name: 'chapter02BothCamera', component: chapter02BothCamera, },
    { path: '/chapter02CamerasLookAt', name: 'chapter02CamerasLookAt', component: chapter02CamerasLookAt, },
    { path: '/ambientLight', name: 'ambientLight', component: ambientLight, },
    { path: '/spotLight', name: 'spotLight', component: spotLight, },
    { path: '/pointLight', name: 'pointLight', component: pointLight, },
    { path: '/directionalLight', name: 'directionalLight', component: directionalLight, },
    { path: '/hemisphereLight', name: 'hemisphereLight', component: hemisphereLight, },
    { path: '/areaLight', name: 'areaLight', component: areaLight, },
    { path: '/lensflares', name: 'lensflares', component: lensflares, },
    { path: '/basicMeshMaterial', name: 'basicMeshMaterial', component: basicMeshMaterial, },
    { path: '/geometriesPlane', name: 'geometriesPlane', component: geometriesPlane, },
    { path: '/geometriesShape', name: 'geometriesShape', component: geometriesShape, },
    { path: '/depthMaterial', name: 'depthMaterial', component: depthMaterial, },
    { path: '/extrudeGeometry', name: 'extrudeGeometry', component: extrudeGeometry, },
    { path: '/extrudeTube', name: 'extrudeTube', component: extrudeTube, },
    { path: '/extrudeSvg', name: 'extrudeSvg', component: extrudeSvg, },
    { path: '/textGeometry', name: 'textGeometry', component: textGeometry, },
    { path: '/sprites', name: 'sprites', component: sprites, },
    { path: '/basicPointCloud', name: 'basicPointCloud', component: basicPointCloud, },
    { path: '/programBasedPoint', name: 'programBasedPoint', component: programBasedPoint, },
    { path: '/spritesHud', name: 'spritesHud', component: spritesHud, },
    { path: '/sprites3d', name: 'sprites3d', component: sprites3d, },
    { path: '/createParticleSystemFromModel', name: 'createParticleSystemFromModel', component: createParticleSystemFromModel, },
    { path: '/grouping', name: 'grouping', component: grouping, },
    { path: '/merging', name: 'merging', component: merging, },
    { path: '/loadSaveJson', name: 'loadSaveJson', component: loadSaveJson, },
    { path: '/loadObj', name: 'loadObj', component: loadObj, },
    { path: '/butterfly', name: 'butterfly', component: butterfly, },
    { path: '/loadCollada', name: 'loadCollada', component: loadCollada, },
    { path: '/loadPdb', name: 'loadPdb', component: loadPdb, },
    { path: '/loadPly', name: 'loadPly', component: loadPly, },
    { path: '/basicAnimation', name: 'basicAnimation', component: basicAnimation, },
    { path: '/selectingObjects', name: 'selectingObjects', component: selectingObjects, },
    { path: '/animationTween', name: 'animationTween', component: animationTween, },
    { path: '/trackballControlsCamera', name: 'trackballControlsCamera', component: trackballControlsCamera, },
    { path: '/flyControlsCamera', name: 'flyControlsCamera', component: flyControlsCamera, },
    { path: '/firstPersonCamera', name: 'firstPersonCamera', component: firstPersonCamera, },
    // { path: '/morphTargets', name: 'morphTargets', component: morphTargets, },
    { path: '/morphTargetManually', name: 'morphTargetManually', component: morphTargetManually, },
    { path: '/house3d', name: 'house3d', component: house3d, },
    { path: '/vrHouseView', name: 'vrHouseView', component: vrHouseView, },
    { path: '/houseView', name: 'houseView', component: houseView, },
    { path: '/webGpuTest', name: 'webGpuTest', component: webGpuTest, },
    { path: '/mediaRecorder', name: 'mediaRecorder', component: mediaRecorder, },
]

const router = createRouter({
    history: createWebHashHistory(),
    routes
})

export default router
